<script setup lang="ts">
// import { Button as VanButton } from 'vant'  // as 是别名 防止与原生button 分不清
import { useUserStore } from './stores'
import type { User } from './types/user'
import { request } from './utils/request'
const store = useUserStore()

const login = () => {
  request<User>('login/password', 'POST', {
    mobile: '13211112222',
    password: 'abc12345'
  })
    .then((res) => {
      console.log(res)
      store.setUser(res.data)
    })
    .catch((e) => {
      console.log(e)
    })
}
const getUserinfo = () => {
  request('patient/myUser').then((res) => {
    console.log(res)
  })
}
</script>

<template>
  <router-view></router-view>
</template>

<style scoped lang="scss"></style>
